package cn.demoncat.util.zookeeper.constant;

import java.util.HashMap;
import java.util.Map;

/**
 * Zookeeper节点常量
 * 
 * @author 延晓磊
 *
 * @since 2018年11月6日
 */
public class NodeConstant {

	/**
	 * 节点模式
	 * 
	 * @author 延晓磊
	 *
	 * @since 2018年11月6日
	 */
	public static final class Mode{
		//持久节点
		public static final String PERSISTENT = "PERSISTENT";
		//持久序列节点
		public static final String PERSISTENT_SEQUENTIAL = "PERSISTENT_SEQUENTIAL";
		//临时节点
		public static final String EPHEMERAL = "EPHEMERAL";
		//临时序列节点
		public static final String EPHEMERAL_SEQUENTIAL = "EPHEMERAL_SEQUENTIAL";
		
		public static final Map<String, String> MAP = new HashMap<String, String>(){
			private static final long serialVersionUID = 1L;
		{
			put(PERSISTENT, "持久节点");
			put(PERSISTENT_SEQUENTIAL, "持久序列节点");
			put(EPHEMERAL, "临时节点");
			put(EPHEMERAL_SEQUENTIAL, "临时序列节点");
		}};
	}
 
}
